<html>
<title><?=$title?></title>
	<head>
		<style type="text/css">
			p.serif{font-family:"Times New Roman",Times,serif;}
			p.sansserif{font-family:Arial,Helvetica,sans-serif;}
		</style>
	</head>
	
	<body>
		<table border="0">
			<tr>
				<td>				
					<img  src="<?=base_url();?>style/images/logo-ecamp.png" width="145" height="75" />
				</td>
				<td>
					<p><h2>Laporan Buku Besar  </h2>
                                        <br> <h3>Periode <?=$tanggal_awal.' s/d '.$tanggal_akhir?></h3>
				<td>
			</tr>
		</table>
            
		<table border="1">
		<tr>
			<td>No. Akun</td>
			<td>Nama Akun</td>
                        <td>No Transaksi</td>
			<td>Transaksi</td>
                        <td>Debit</td>
                        <td>Kredit</td>
		</tr>
                <? if (count($laporan) <= 0) :?>
                <tr>
                    <td colspan="6" align="center"><h3>Data Tidak Ada</h3></td>
                </tr>
                <? endif;?>
                <? foreach ($laporan as $row){ $total_debet = 0; $total_kredit = 0; ?>
		<tr>	
                    <td><strong><?=$row['kode']?></strong></td>
                    <td colspan="5"><strong><?=$row['nama']?></strong></td>
		</tr>
                <? foreach ($row['detail'] as $detail){ ?>
                    <tr>
                        <td colspan="2" align="right"><?=$detail['tanggal']?></td>
                        <td><?=$detail['no_bukti']?></td>
                        <td><?=$detail['keterangan']?></td>
                        <td align="right"><?=number_format($detail['debet'], 2); ?></td>
                        <td align="right"><?=number_format($detail['kredit'], 2); ?></td>
                    </tr>
                <? $total_debet += $detail['debet']; $total_kredit += $detail['kredit'];
                } ?>
		<tr>
                    <td colspan="4">Total dari : <?=$row['kode'].' - '.$row['nama']?></td>
                    <td><strong><?=number_format($total_debet, 2); ?></strong></td>
                    <td><strong><?=number_format($total_kredit, 2); ?></strong></td>
		</tr>
                <?} ?>
				
		</table>
	</body>
</html>